/**
 * $Revision: 1.0 $
 * $Author: Eric Yang $
 * $Date: Aug 2, 2009 3:45:19 PM $
 *
 * Author: Eric Yang
 * Date  : Aug 2, 2009 3:45:19 PM
 *
 */
package com.gooex.domain.organization;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * User Role
 * 
 * @author Eric Yang
 * @version 1.0
 */
public class Role extends AuthorizedObject implements Serializable {
	/** TODO comment */
	private Group group;

	/** TODO comment */
	private List<User> users = new ArrayList<User>();

	/** TODO comment */
	public void addUser(User user) {
		if (!users.contains(user)) {
			users.add(user);
			user.setRole(this);
		}
	}

	/* ============setter/getter============================ */
	public List<User> getUsers() {
		return users;
	}

	public void setUsers(List<User> users) {
		this.users = users;
	}

	public Group getGroup() {
		return group;
	}

	public void setGroup(Group group) {
		this.group = group;
	}

}
